From f248e9093e6f54477a7639feed4b77894c45b00c Mon Sep 17 00:00:00 2001 From: justbur Date: Wed, 2 Sep 2015 12:51:47 -0400 Subject: [PATCH] Allow disabling truncation --- which-key.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/which-key.el b/which-key.el index 37d8bb6a9aa..e57a63f1f3d 100644 --- a/which-key.el +++ b/which-key.el @@ -63,7 +63,7 @@ which-key popup." (defcustom which-key-max-description-length 27 "Truncate the description of keys to this length. -Also adds \"..\"." +Also adds \"..\". If nil, disable any truncation." :group 'which-key :type 'integer) @@ -829,7 +829,8 @@ If KEY contains any \"special keys\" defined in (defsubst which-key--truncate-description (desc) "Truncate DESC description to `which-key-max-description-length'." - (if (> (string-width desc) which-key-max-description-length) + (if (and which-key-max-description-length + (> (string-width desc) which-key-max-description-length)) (concat (substring desc 0 which-key-max-description-length) "..") desc)) -- 2.30.2